package Lab02.test21;
public class Test {
    public static void main(String[] args) {
        char c = '1';
        String string = "1234567891011";
        System.out.println(getCharCount(c, string));
    }
    public static int getCharCount(char c, String string) {
        int count = 0;
        for (int i = 0; i < string.length(); i++) {
            char temp = string.charAt(i);
            if (c == temp)
                count++;
        }
            return count;
        }

}

